package xyz.lwm.lazycat.utility.matcher;

class OrMatcher<T> implements Matcher<T> {

    private final Matcher<T> matcher;

    private final Matcher<T> other;

    public OrMatcher(Matcher<T> matcher, Matcher<T> other) {
        this.matcher = matcher;
        this.other = other;
    }

    @Override
    public boolean matches(T target) {
        return matcher.matches(target) || other.matches(target);
    }
    
}
